<div id="left_side">
	<div id="article_archives">
		<div class="header">
			<h1><?php echo $dataResults->article_subject;?></h1>
			<div class="post">
				วันที่ <?php echo date('d/m/Y',strtotime($dataResults->article_publish_date));?><span class="grayLight"> l </span>YOU2PLAY<span class="grayLight"> l </span><?php echo number_format($dataResults->views);?> VIEWS
			</div>
			<?php echo $module_facebook_plugins_share;?>
		</div>
		<?php if($dataResults->article_type == "article"):?>
			<?php echo image_asset('../uploads/chords/images/original/'.@$dataResults->image->article_file_name.'.'.@$dataResults->image->article_file_ext,'',array('width' => '660','title' => $dataResults->article_subject,'alt' => $dataResults->article_subject));?>
		<?php else:?>
			<?php if(!empty($dataResults->clip_file_name)):?>
				<div id="video_play_object">
					<!--Vdo Player-->
					<div id="vdoPlayer">
						<?php if($this->agent->is_mobile()):?>
							<video id='my_video' controls preload='none'></video>
						<?php endif;?>
					</div>
				</div>					
			<?php else:?>
				<?php echo image_asset('../uploads/chords/images/original/'.@$dataResults->image->article_file_name.'.'.@$dataResults->image->article_file_ext,'',array('width' => '660','title' => $dataResults->article_subject,'alt' => $dataResults->article_subject));?>
			<?php endif;?>		
		<?php endif;?>
		<div class="info">
			<?php echo $dataResults->article_detail;?>
		</div>
		<div id="article_archives_comment">
			<h2>
				<span>
					แสดงความคิดเห็น
				</span>
			</h2>
			<!--Facebook Comment-->
			<?php echo $module_facebook_plugins_comment;?>
		</div>	
	</div>
</div>
<div id="right_side">
	<!--Module-->
	<?php
	if(!empty($module))
	foreach($module as $value):?>
	<?php echo $value;?>
	<?php endforeach;?>
</div>
<?php if(!empty($dataResults->clip_file_name)): //if clip_file_name load jwplayer?>
<script type="text/javascript" language="javascript">
(function($) {
/*whatever jQuery stuff*/
	$(function(){
		var is_mobile = '<?php echo $this->agent->is_mobile();?>';
		var url = "<?php echo other_asset_url('uploads/chords/files/'.date('Y/m/d',strtotime($dataResults->create_date)).'/'.$dataResults->clip_file_name.'.'.$dataResults->clip_file_ext);?>";
		if(is_mobile){
			//Set Video Source
			$('#my_video').append("<source id='mp4' src='"+url+"' type='video/mp4'>");
			$('#my_video').attr('src',""+url+"");
			$('#my_video').attr('width',660);
			$('#my_video').attr('height',382);		
			// videoplaza sdk, 4 sec time-out, callback function
			loadScript("<?php echo js_asset_url('media/html5-sdk-1.0.12.15.1-ea.min.js');?>",4000,initVideoplaza);
			// *** START - videoplaza plugin config ***
			vpConfig = {
				vphost : 'http://th-pmdplus.videoplaza.tv',
				category : 'video',
				tags : ['standard'],
				flags: [],
				playbackPosition: [] // mid-roll cue points, if any.
			}
			// *** END - videoplaza plugin config ***
			//Auto Play && Loop
			$('#my_video').attr('autoplay','autoplay');	
		} else {
			jwplayer("vdoPlayer").setup({
				autostart: true,
		      	flashplayer: "<?php echo js_asset_url('media/player.swf');?>",
		      	width: 660,
		      	height: 382,
				file: ""+url+"",
				image: "<?php echo other_asset_url('uploads/chords/images/original/'.@$dataResult->image->article_file_name.'.'.@$dataResult->image->article_file_ext);?>",
		      	plugins: "<?php echo js_asset_url('media/vp_plugin.swf');?>",
		      	vpdomain: "http://th-pmdplus.videoplaza.tv",
		      	vpshares: "video",
		      	vptags: "",
				closebuttontimeout: 5				
			});		
		}
	});	
})(jQuery);

</script>
<?php endif;?>